﻿<%@ Page Title="" Language="C#" MasterPageFile="~/DCTEDU_/Admin.Master" AutoEventWireup="true"
    CodeBehind="QLCauHinhHomeControl.aspx.cs" Inherits="UserKTXD.DCTEDU_.CauHinhWeb.QLCauHinhHomeControl" %>

<%@ Register Assembly="PagerControl" Namespace="CutePager" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HomePlaceHolder" runat="server">
    <div class="hrm_header_placeholder">
        Quản Lý Home Control(Hiển thị ngoài trang chủ)</div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div style="padding: 10px">
                <asp:HiddenField ID="H_CatalogId" Value="0" runat="server" />
                <asp:Panel ID="PanelAdd" Width="100%" GroupingText="Cập nhật thông tin" runat="server">
                    <table border="0" width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                            <td colspan="4" height="10">
                            </td>
                        </tr>
                        <tr>
                            <td width="20">
                            </td>
                            <td width="110" class="hrm_title_blue">
                            </td>
                            <td width="7" class="hrm_title_blue">
                            </td>
                            <td>
                                <asp:Label ID="lblStatus" ForeColor="Red" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" height="4">
                            </td>
                        </tr>
                        <tr>
                            <td width="20">
                            </td>
                            <td width="110" class="hrm_title_blue">
                                Chọn loại chuyên mục
                            </td>
                            <td width="7" class="hrm_title_blue">
                                :
                            </td>
                            <td>
                                <asp:DropDownList ID="cboLoaiChuyenMuc" CssClass="hrm_textbox" Width="205px" runat="server">
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" SetFocusOnError="True"
                                    ControlToValidate="cboLoaiChuyenMuc" InitialValue="0" Display="Dynamic" ErrorMessage=" (*)"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" height="4">
                            </td>
                        </tr>
                        <tr>
                            <td width="20">
                            </td>
                            <td width="110" class="hrm_title_blue">
                                Chú thích
                            </td>
                            <td width="7" class="hrm_title_blue">
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txtDuongDan" CssClass="hrm_textbox" Width="400px" MaxLength="100"
                                    runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" SetFocusOnError="True"
                                    ControlToValidate="txtDuongDan" Display="Dynamic" ErrorMessage=" (*)"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" height="4">
                            </td>
                        </tr>
                        <tr>
                            <td width="20">
                            </td>
                            <td width="110" class="hrm_title_blue">
                            </td>
                            <td width="7" class="hrm_title_blue">
                            </td>
                            <td>
                                <asp:ImageButton ID="cmdSave" ImageUrl="~/Images/save.jpg" runat="server" OnClick="cmdSave_Click" />
                                <asp:ImageButton ID="cmdReset" CausesValidation="false" ImageUrl="~/Images/huy.jpg"
                                    runat="server" OnClick="cmdReset_Click" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" height="8">
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
                <asp:Panel ID="PanelList" Width="100%" Height="355" GroupingText="Danh sách" runat="server">
                    <table border="0" width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                            <td width="20">
                            </td>
                            <td style="padding-right: 15px">
                                <asp:Panel ID="PanelGrid" Width="100%" runat="server">
                                    <br />
                                    <asp:GridView ID="gridCatalog" runat="server" DataKeyNames="Id" Width="100%" BackColor="White"
                                        OnRowCommand="gridCatalog_RowCommand" OnRowDataBound="gridCatalog_RowDataBound"
                                        OnRowDeleting="gridCatalog_RowDeleting" EmptyDataText="<br><center>Không tồn tại dữ liệu</center><br>"
                                        BorderColor="#CCCCCC" AutoGenerateColumns="false" BorderStyle="Solid" BorderWidth="1px"
                                        CellPadding="3">
                                        <Columns>
                                            <asp:BoundField DataField="id" Visible="false" HeaderText="id"></asp:BoundField>
                                            <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
                                                ItemStyle-Width="7%" HeaderText="Sửa">
                                                <ItemTemplate>
                                                    <asp:ImageButton ID="cmdSelects" runat="server" CssClass="command_button" CausesValidation="false"
                                                        CommandName="Select" ToolTip="Click để sửa" ImageUrl="~/Images/edit.png" CommandArgument='<%# Eval("id") %>' />
                                                </ItemTemplate>
                                                <ItemStyle HorizontalAlign="Center" Width="7%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Tên Loại Chuyên mục"
                                                ItemStyle-Width="150">
                                                <ItemTemplate>
                                                    <asp:Label ID="Label1" runat="server" Text='<%# GetTenLoaiChuyenMuc(Eval("IdLoaiChuyenMuc"))%>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="ChuThich" ItemStyle-Width="32%" HeaderText="Chú Thích">
                                            </asp:BoundField>
                                        </Columns>
                                        <RowStyle ForeColor="#000066" />
                                        <SelectedRowStyle BackColor="#dedfdf" Font-Bold="True" ForeColor="Gray" />
                                        <HeaderStyle BackColor="#006699" Font-Bold="True" HorizontalAlign="Left" ForeColor="White" />
                                    </asp:GridView>
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" height="10">
                                <cc1:Pager ID="Pager1" runat="server" PreviousClause="" NextClause="" LastClause=""
                                    FirstClause="" PageClause="Trang" OfClause="/" PageSize="10" OnCommand="Pager1_Command">
                                </cc1:Pager>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
